var tree_list_index = 0;

function tree_after_drag()
{
	tree_list_index = 0;
	var list = document.getElement('ul.page_tree_view');
	if (list)
		fix_list_zebra(list);
}

function fix_list_zebra(list)
{
	try
	{
		var items = $A(list.getChildren());
		items.each(function(item){
			var branch_element = $(item).getElement('div.tree_branch');
			
			if (branch_element)
			{
				if (tree_list_index % 2)
					$(branch_element).addClass('even');
				else
					$(branch_element).removeClass('even');
			}

			tree_list_index++;

			var item_children = item.getChildren();
			item_children.each(function(sub_item){
				if (sub_item.match('ul'))
					fix_list_zebra(sub_item);
			})

		})
	} catch (e) {}
}